<?php
/*
反腾讯网址安全检测系统
Description:屏蔽腾讯电脑管家网址安全检测
Author:消失的彩虹海
*/
if (isset($nosecu) && $nosecu == true) return;

$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';

if (stripos($user_agent, 'Baiduspider') !== false || stripos($user_agent, '360Spider') !== false || stripos($user_agent, 'YisouSpider') !== false || stripos($user_agent, 'Sogou web spider') !== false || stripos($user_agent, 'Sogou inst spider') !== false || stripos($user_agent, 'Googlebot/') !== false || stripos($user_agent, 'bingbot/') !== false || stripos($user_agent, 'Bytespider') !== false) {
	return;
}
if (!empty($_SERVER['HTTP_REFERER'])) {
	if (stripos($_SERVER['HTTP_REFERER'], '.tr.com') !== false || stripos($_SERVER['HTTP_REFERER'], '.wsd.com') !== false || stripos($_SERVER['HTTP_REFERER'], '.oa.com') !== false || stripos($_SERVER['HTTP_REFERER'], '.cm.com') !== false || stripos($_SERVER['HTTP_REFERER'], '/membercomprehensive/') !== false || stripos($_SERVER['HTTP_REFERER'], 'www.internalrequests.org') !== false) {
		$_SESSION['txprotectblock'] = true;
	}
}
$HTTP_ACCEPT = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : '';
//HEADER特征屏蔽
if (!isset($HTTP_ACCEPT) || empty($user_agent) || stripos(strtolower($user_agent), "manager") !== false || stripos($user_agent, 'ozilla') !== false && stripos($user_agent, 'Mozilla') === false || stripos($user_agent, "Windows NT 6.1") !== false && $HTTP_ACCEPT == '*/*' || stripos($user_agent, "Windows NT 5.1") !== false && $HTTP_ACCEPT == '*/*' || stripos($HTTP_ACCEPT, "vnd.wap.wml") !== false && stripos($user_agent, "Windows NT 5.1") !== false || isset($_COOKIE['ASPSESSIONIDQASBQDRC']) || stripos($user_agent, "Alibaba.Security.Heimdall") !== false || stripos($user_agent, 'wechatdevtools/') !== false || stripos($user_agent, 'libcurl/') !== false || stripos($user_agent, 'python') !== false || stripos($user_agent, 'Go-http-client') !== false || stripos($user_agent, 'HeadlessChrome') !== false || @$_SESSION['txprotectblock'] == true) {
	exit('Click to continue!' . $date);
}
if (stripos($user_agent, 'Coolpad Y82-520') !== false && $HTTP_ACCEPT == '*/*' || stripos($user_agent, 'Mac OS X 10_12_4') !== false && $HTTP_ACCEPT == '*/*' || stripos($user_agent, 'iPhone OS') !== false && stripos($user_agent, 'baiduboxapp/') === false && $HTTP_ACCEPT == '*/*' || stripos($user_agent, 'Android') !== false && $HTTP_ACCEPT == '*/*' || stripos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en') !== false && stripos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'zh') === false || stripos($user_agent, 'iPhone') !== false && stripos($user_agent, 'en-') !== false && stripos($user_agent, 'zh') === false || stripos($user_agent, 'iPhone OS 9_1') !== false && $_SERVER['HTTP_CONNECTION'] == 'close') {
	exit('您当前浏览器不支持或操作系统语言设置非中文，无法访问本站！');
}
